﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pLib
{
    public static class Extensions
    {
        public static string Enumerate(this IEnumerable<string> list, string separator = "")
        {
            var result = "";
            var tList = list.ToList();
            for (var i = 0; i < tList.Count; i++)
            {
                if (tList[i] == null) continue;
                result = result + (tList[i] + (i != tList.Count - 1 ? separator : ""));
            }
            return result;
        }
    }
}
